<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="div01">
			
		</div>
		<div id="div02">
			
		</div>
		<div id="div03">
			
		</div>
		<form>
			<input type="text" id="input1" />
		</form>
		
		<script type="text/javascript">
			
			// 1. 修改元素中的文本内容
			div01.textContent = "哈哈"
			
			// 2. 修改元素的html
			div02.textContent = "<a href='https://www.baidu.com'>百度</a>";
			div03.innerHTML = "<a href='https://www.baidu.com'>百度</a>";
						
			// 3. 修改元素样式
			div03.style.background = "#ff0000";
			div03.style.width = "100px";
			div03.style.height = "100px";
			
		</script>
	</body>
</html>